package com.usian.controller;

import com.usian.apis.commont.CommentControllerApi;
import com.usian.model.comment.CommentSaveDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/comment")
public class CommentController  implements CommentControllerApi {

    @Autowired
    private CommentService commentService;

    @RequestMapping("/save")
    @Override
    public ResponseResult saveComment(@RequestBody CommentSaveDto dto) {
        return commentService.saveComment(dto);
    }
}
